
//
//  ConsultCell.m
//  soccer
//
//  Created by 上官千城 on 15/9/4.
//  Copyright (c) 2015年 上官千城. All rights reserved.
//

#import "OConsultCell.h"

#define imgHost @"192.168.1.27"
#define imgPort 9000
#define imgPath @"/os/upload/Img"
#define txtPath @"/os/upload/File"


@implementation OConsultCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self && [reuseIdentifier isEqualToString:@"consultCell"]) {
        [self creatCell];
    }
    if (self && [reuseIdentifier isEqualToString:@"CommentCell"]) {
        [self creatCommentCell];
    }
    if (self && [reuseIdentifier isEqualToString:@"RightCommentCell"]) {
        [self creatCommentDetail];
    }
    return self;
}
//评论详情
-(void)creatCommentDetail
{
    //点赞数
    self.allAgreeNum = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, 60, 20)];
    self.allAgreeNum.backgroundColor = [UIColor orangeColor];
    self.allAgreeNum.font = [UIFont systemFontOfSize:15*Proportion];
    self.allAgreeNum.textColor = RGBACOLOR(0, 186, 170, 1);
    [self.contentView addSubview:self.allAgreeNum];
    //总评论数
    self.allCommentNum = [[UILabel alloc]initWithFrame:CGRectMake(self.contentView.frame.size.width - 60, self.allAgreeNum.frame.origin.y, 40, 20)];
    self.allCommentNum.backgroundColor = [UIColor redColor];
    self.allCommentNum.font = self.allAgreeNum.font;
    self.allCommentNum.textColor = self.allAgreeNum.textColor;
    [self.contentView addSubview:self.allCommentNum];
    
    UIView *aline = [[UIView alloc]initWithFrame:CGRectMake(10, self.allAgreeNum.frame.origin.y + self.allAgreeNum.frame.size.height + 10,self.contentView.frame.size.width/4+10 , 1)];
    aline.backgroundColor = [UIColor grayColor];
    [self.contentView addSubview:aline];
    
    UILabel *hotComment = [[UILabel alloc]initWithFrame:CGRectMake(aline.frame.origin.x+aline.frame.size.width+10, aline.frame.origin.y-10 , 70, 20)];
    hotComment.text = @"热门评论";
    hotComment.font = self.allCommentNum.font;
//    hotComment.textColor = [UIColor grayColor];
    [self.contentView addSubview:hotComment];
    
    UIView *bline = [[UIView alloc]initWithFrame:CGRectMake(hotComment.frame.origin.x+hotComment.frame.size.width + 10, aline.frame.origin.y, aline.frame.size.width, 1)];
    bline.backgroundColor = [UIColor grayColor];
    [self.contentView addSubview:bline];
    
    

//    其他评论者底层View
        self.textView = [[UIView alloc]initWithFrame:CGRectMake(self.hotText.frame.origin.x, 250, self.hotText.frame.size.width, 200)];
        self.textView.backgroundColor = RGBACOLOR(237, 236, 239, 1);
        [self.contentView addSubview:self.textView];
        //评论者A头像
        self.userImageA = [[UIImageView alloc]initWithFrame:CGRectMake(5, 5, self.hotUserimage.frame.size.width, self.hotUserimage.frame.size.height)];
        self.userImageA.layer.masksToBounds = YES;
        self.userImageA.layer.cornerRadius = 20;
        [self.textView addSubview:self.userImageA];
        //评论者A昵称
        self.userNameA = [[UILabel alloc]initWithFrame:CGRectMake(self.userImageA.frame.origin.x+self.userImageA.frame.size.width+5, self.userNameA.frame.origin.y+5, 200, 20)];
        [self.textView addSubview:self.userNameA];
        //评论者A时间
        self.userTimeA = [[UILabel alloc]initWithFrame:CGRectMake(self.userNameA.frame.origin.x, self.userNameA.frame.origin.y + self.userNameA.frame.size.height, 100, 20)];
        self.userTimeA.textColor = [UIColor lightGrayColor];
        self.userTimeA.font = [UIFont systemFontOfSize:14];
        self.userTimeA.text = @"12月31日";
        [self.textView addSubview:self.userTimeA];
        //评论者A点赞
        self.userGoodA = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.userGoodA setImage:[UIImage imageNamed:@"manpage_15"] forState:UIControlStateNormal];
        self.userGoodA.frame = CGRectMake(self.textView.frame.size.width - 40, self.userImageA.frame.origin.y-5, 30, 30);
        [self.userGoodA addTarget:self action:@selector(userGoodAbutton) forControlEvents:UIControlEventTouchUpInside];
        [self.textView addSubview:self.userGoodA];
        //A点赞数量
        self.goodNumA = [[UILabel alloc]initWithFrame:CGRectMake(self.userGoodA.frame.origin.x-5, self.userGoodA.frame.origin.y + self.userGoodA.frame.size.height-5 , 50, 20)];
        self.goodNumA.text = @"123456";
        self.goodNumA.textColor = [UIColor lightGrayColor];
        self.goodNumA.font = [UIFont systemFontOfSize:12];
        [self.textView addSubview:self.goodNumA];
        //A正文
        self.textA = [[UILabel alloc]initWithFrame:CGRectMake(self.userNameA.frame.origin.x, self.userNameA.frame.origin.y + self.userNameA.frame.size.height+10, self.textView.frame.size.width - self.userImageA.frame.size.width-10, 60)];
        self.textA.numberOfLines = 0;
        [self.textView addSubview:self.textA];
        //B头像
        self.userImageB = [[UIImageView alloc]initWithFrame:CGRectMake(self.userImageA.frame.origin.x, self.textA.frame.origin.y + self.textA.frame.size.height+ 5, self.userImageA.frame.size.width, self.userImageA.frame.size.height)];
        self.userImageB.layer.masksToBounds = YES;
        self.userImageB.layer.cornerRadius = 20;
        [self.textView addSubview:self.userImageB];
        //B昵称
        self.userNameB = [[UILabel alloc]initWithFrame:CGRectMake(self.userImageB.frame.origin.x + self.userImageB.frame.size.width+5, self.userImageB.frame.origin.y, self.userNameA.frame.size.width, self.userNameA.frame.size.height)];
        [self.textView addSubview:self.userNameB];
        //B时间
        self.userTimeB = [[UILabel alloc]initWithFrame:CGRectMake(self.userNameB.frame.origin.x, self.userNameB.frame.origin.y + self.userNameA.frame.size.height, 100, 20)];
        self.userTimeB.textColor = [UIColor lightGrayColor];
        self.userTimeB.font = [UIFont systemFontOfSize:14];
        self.userTimeB.text = @"12月31日";
        [self.textView addSubview:self.userTimeB];
        //评论者A点赞
        self.userGoodB = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.userGoodB setImage:[UIImage imageNamed:@"manpage_15"] forState:UIControlStateNormal];
        self.userGoodB.frame = CGRectMake(self.textView.frame.size.width - 40, self.userImageB.frame.origin.y-5, 30, 30);
        [self.userGoodB addTarget:self action:@selector(userGoodBbutton) forControlEvents:UIControlEventTouchUpInside];
        [self.textView addSubview:self.userGoodB];
        //B点赞数量
        self.goodNumB = [[UILabel alloc]initWithFrame:CGRectMake(self.userGoodB.frame.origin.x-5, self.userGoodB.frame.origin.y + self.userGoodB.frame.size.height-5 , 50, 20)];
        self.goodNumB.text = @"123456";
        self.goodNumB.textColor = [UIColor lightGrayColor];
        self.goodNumB.font = [UIFont systemFontOfSize:12];
        [self.textView addSubview:self.goodNumB];
        //B正文
        self.textB = [[UILabel alloc]initWithFrame:CGRectMake(self.userNameB.frame.origin.x, self.userNameB.frame.origin.y + self.userNameB.frame.size.height+10, self.textView.frame.size.width - self.userImageB.frame.size.width-10, 60)];
        self.textB.numberOfLines = 0;
        [self.textView addSubview:self.textB];


}


//创建评论Cell
-(void)creatCommentCell
{//热门评论
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 60, 20)];
    label.text = @"热门评论";
    label.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:label];
    //line
    UIView *line = [[UIView alloc]initWithFrame:CGRectMake(label.frame.origin.x + label.frame.size.width +10, 8, WIDTH, 1)];
    line.alpha = 0.2;
    line.backgroundColor = [UIColor grayColor];
    [self.contentView addSubview:line];
    //热点评论者头像
    self.hotUserimage = [[UIImageView alloc]initWithFrame:CGRectMake(40, 30, 40, 40)];
    self.hotUserimage.layer.masksToBounds = YES;
    self.hotUserimage.layer.cornerRadius = 20;
    self.hotUserimage.userInteractionEnabled = YES;
    self.hotUserimage.image = [UIImage imageNamed:@"manpage_12@2x"];
//    self.hotUserimage.backgroundColor = [UIColor grayColor];
    [self.contentView addSubview:self.hotUserimage];
    //热点评论轻怕
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapACtion:)];
    [self.hotUserimage addGestureRecognizer:tap];
    //热点评论者昵称
    self.hotUserName = [[UILabel alloc]initWithFrame:CGRectMake(self.hotUserimage.frame.origin.x+self.hotUserimage.frame.size.width+10, self.hotUserimage.frame.origin.y, WIDTH/2, 20)];
//        self.hotUserName.text = @"西班大牙";
//        self.hotUserName.backgroundColor = [UIColor orangeColor];
    [self.contentView addSubview:self.hotUserName];
    //热点评论者时间
    self.hotUserTime = [[UILabel alloc]initWithFrame:CGRectMake(self.hotUserName.frame.origin.x, self.hotUserName.frame.origin.y+self.hotUserName.frame.size.height, 100, 20)];
    self.hotUserTime.text = @"12月31日";
    self.hotUserTime.textColor = [UIColor lightGrayColor];
    self.hotUserTime.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:self.hotUserTime];
    //热点评论者点赞
    self.hotGood = [UIButton buttonWithType:UIButtonTypeCustom];
    self.hotGood.frame = CGRectMake(WIDTH - 80, self.hotUserName.frame.origin.y, 30, 30);
    [self.hotGood setImage:[UIImage imageNamed:@"manpage_15@2x"] forState:UIControlStateNormal];
    [self.hotGood addTarget:self action:@selector(hotGoodAction) forControlEvents:UIControlEventTouchUpInside];
    [self.contentView addSubview:self.hotGood];
    //评赞数
    self.hotGoodNum = [[UILabel alloc]initWithFrame:CGRectMake(self.hotGood.frame.origin.x + self.hotGood.frame.size.width + 5, self.hotGood.frame.origin.y, 30, 20)];
    self.hotGoodNum.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:self.hotGoodNum];
    //热点评论者正文
    self.hotText = [[UILabel alloc]initWithFrame:CGRectMake(self.hotUserTime.frame.origin.x, self.hotUserTime.frame.origin.y+self.hotUserTime.frame.size.height, WIDTH - self.hotUserimage.frame.size.width - 60, 80)];
    self.hotText.lineBreakMode = NSLineBreakByWordWrapping;
//        self.hotText.backgroundColor = [UIColor orangeColor];
    self.hotText.numberOfLines = 0;
    [self.contentView addSubview:self.hotText];
    
}
//B评论者 点赞
-(void)userGoodBbutton
{
    NSLog(@"B");
}
//评论者A点赞
-(void)userGoodAbutton
{
    NSLog(@"A");
}

//热点评论者点赞方法
-(void)hotGoodAction
{
    NSLog(@"dianzan");
    NSInteger i = [self.hotGoodNum.text integerValue];
    self.hotGoodNum.text = [NSString stringWithFormat:@"%ld",++i];
    
}

//创建资讯Cell
-(void)creatCell
{//媒体图片
    self.head = [[UIImageView alloc]initWithFrame:CGRectMake(20, 10, 55, 55)];
    //    self.head.backgroundColor = [UIColor orangeColor];
    self.head.userInteractionEnabled = YES;
    self.head.layer.masksToBounds = YES;
//    self.head.image = [UIImage imageNamed:@"manpage-2_04"];
    [self.contentView addSubview:self.head];
    //轻拍手势
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(headButton)];
    [self.head addGestureRecognizer:tap];
    //nickName
    //    self.nickName = [[UILabel alloc]initWithFrame:CGRectMake(10, self.head.frame.origin.y + self.head.frame.size.height +5, 70, 20)];
    ////    self.nickName.backgroundColor = [UIColor redColor];
    //    self.nickName.textAlignment = NSTextAlignmentCenter;
    //    [self.contentView addSubview:self.nickName];
    //标题
    self.titile = [[UILabel alloc]initWithFrame:CGRectMake(self.head.frame.origin.x + self.head.frame.size.width+10, self.head.frame.origin.y, WIDTH - self.head.frame.size.width -40, 20)];
    self.titile.font = [UIFont boldSystemFontOfSize:18*Proportion];
//    self.titile.numberOfLines = 0;
//        self.titile.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.titile];
    //发表时间
    self.timed = [[UILabel alloc]initWithFrame:CGRectMake(self.titile.frame.origin.x, self.titile.frame.origin.y + self.titile.frame.size.height + 10, 100, 20)];
    //    self.timed.backgroundColor = [UIColor blackColor];
    self.timed.font = [UIFont systemFontOfSize:14*Proportion];
    self.timed.textColor = [UIColor lightGrayColor];
    self.timed.text = @"12月31日";
    [self.contentView addSubview:self.timed];
    //咨询正文
    self.massage = [[UILabel alloc]initWithFrame:CGRectMake(self.titile.frame.origin.x, self.timed.frame.origin.y+self.timed.frame.size.height + 5, self.titile.frame.size.width, 100)];
    self.massage.numberOfLines = 0;
//        self.massage.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.massage];
    //删除
    
    
    //热度图片
    self.hotImage = [[UIImageView alloc]initWithFrame:CGRectMake(WIDTH - self.timed.frame.size.width - 40, self.timed.frame.origin.y, 20, 20)];
    //    self.hotImage.backgroundColor = [UIColor yellowColor];
    [self.contentView addSubview:self.hotImage];
    //咨询图片1
    //    self.img1 = [[UIImageView alloc]initWithFrame:CGRectMake(self.titile.frame.origin.x, self.massage.frame.origin.y + self.massage.frame.size.height+5, self.contentView.frame.size.width / 4, self.contentView.frame.size.width/4)];
    ////    self.img1.backgroundColor = [UIColor orangeColor];
    //    self.img1.image = [UIImage imageNamed:@"402"];
    //    self.img1.userInteractionEnabled = YES;
    ////    [self.contentView addSubview:self.img1];
    //    //图片1手势
    //    UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap1Action)];
    //    [self.img1 addGestureRecognizer:tap1];
    //    //咨询图片2
    //    self.img2 = [[UIImageView alloc]initWithFrame:CGRectMake(self.img1.frame.origin.x + self.img1.frame.size.width+10, self.img1.frame.origin.y , self.contentView.frame.size.width / 4, self.contentView.frame.size.width/4)];
    ////    self.img2.backgroundColor = [UIColor orangeColor];
    //    self.img2.image = [UIImage imageNamed:@"403"];
    //    self.img2.userInteractionEnabled = YES;
    ////    [self.contentView addSubview:self.img2];
    //    //图片2手势
    //    UITapGestureRecognizer *tap2 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap2Action)];
    //    [self.img2 addGestureRecognizer:tap2];
    //    //咨询图片3
    //    self.img3 = [[UIImageView alloc]initWithFrame:CGRectMake(self.img2.frame.origin.x + self.img2.frame.size.width+10, self.img2.frame.origin.y, self.contentView.frame.size.width / 4, self.contentView.frame.size.width/4)];
    ////    self.img3.backgroundColor = [UIColor orangeColor];
    //    self.img3.image = [UIImage imageNamed:@"401"];
    //    self.img3.userInteractionEnabled = YES;
    ////    [self.contentView addSubview:self.img3];
    //    //图片3手势
    //    UITapGestureRecognizer *tap3 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap3Action)];
    //    [self.img3 addGestureRecognizer:tap3];
    //咨询
        //
    //    self.low = [UIButton buttonWithType:UIButtonTypeCustom];
    //    self.low.frame = CGRectMake(self.high.frame.origin.x + self.high.frame.size.width + 5, self.high.frame.origin.y, self.high.frame.size.width, self.high.frame.size.height);
    //    self.low.backgroundColor = [UIColor brownColor];
    //    [self.low addTarget:self action:@selector(lowButton) forControlEvents:UIControlEventTouchUpInside];
    //    [self.contentView addSubview:self.low];
    //

    
}



//点击个人头像事件
-(void)tapACtion:(UITapGestureRecognizer *)tap
{
    [self.myDelegate pushPerson];
}



//资讯赋值重写model set方法
-(void)setCon:(OConsult *)con
{
    if (_con != con) {
        _con = con;
        OUserInfo *user = [[OUserInfo alloc]init];
        
        NSData *addressData = [con.pictureAddressList dataUsingEncoding:NSUTF8StringEncoding];
        if (addressData) {
            self.imageArray = [NSJSONSerialization JSONObjectWithData:addressData options:NSJSONReadingMutableContainers error:nil];
            
            [self imageButton];
            
        }
        
        
        
        
        if (con.userId == 0) {
            NSData *data =  [self readTxt:con.address];
            NSLog(@"%@",con.address);
            if (data) {
                NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
                self.head.layer.cornerRadius = 10;


//                        NSLog(@"str =  %@  ",str2);
                self.titile.text = [dic objectForKey:@"title"];
                self.massage.text = [dic objectForKey:@"shortcontent"];
                self.timed.text = [self getDate:con.time];
                if ([[dic objectForKey:@"type"]intValue] == 1) {
                    self.head.image = [UIImage imageNamed:@"sina.jpeg"];
                }
                if ([[dic objectForKey:@"type"]intValue] == 2) {
                    self.head.image = [UIImage imageNamed:@"manpage_10@2x"];
                }
                if ([[dic objectForKey:@"type"]intValue] == 3) {
                    self.head.image = [UIImage imageNamed:@"manpage-2_04"];
                }
                if ([[dic objectForKey:@"type"]intValue] == 999) {
                    self.head.image = [UIImage imageNamed:@"Sp⚽️rt＋"];
                }
//                NSLog(@"title %@",dic);
       
                           }
            //        NSLog(@"%@",self.imageArray);
        }
        if (con.userId != 0) {
            
            self.massage.text = con.address;
            [self.massage sizeToFit];
            self.titile.text = con.nickName;
            self.timed.text = [self getDate:con.time];
            self.head.layer.cornerRadius = 30;

            [self.head sd_setImageWithURL:[NSURL URLWithString:con.icon]];
            
        }
//        if (con.userId == user.userId) {
//            
//            self.massage.text = con.address;
//            [self.massage sizeToFit];
//            self.titile.text = con.nickName;
//            self.timed.text = [self getDate:con.time];
//            
//            UIButton *deleteInfo = [UIButton buttonWithType:UIButtonTypeCustom];
//            [deleteInfo setTitle:@"删除咨询" forState:UIControlStateNormal];
//            [deleteInfo setTintColor:[UIColor grayColor]];
//            deleteInfo.frame = CGRectMake(self.titile.frame.origin.x, self.massage.frame.origin.y, 80, 20);
//            [deleteInfo addTarget:self action:@selector(deleteInfoAction) forControlEvents:UIControlEventTouchUpInside];
//            [self.contentView addSubview:deleteInfo];
//        }
    }
    
}

-(NSData *)readTxt:(NSString *)address
{
//    NSString *str = [NSString stringWithFormat:@"http://%@:%d%@/%@",imgHost,imgPort,txtPath,address];
    NSLog(@"address = %@",address);
    NSURL *url = [NSURL URLWithString:address];
    NSString *str2 = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:nil];
    
    NSData *data = [str2 dataUsingEncoding:NSUTF8StringEncoding];
    return data;
    
}

//获取时间
-(NSString *)getDate:(long)timed
{
    NSTimeInterval i=[[NSDate date] timeIntervalSince1970]*1000;
    long time = (i - timed)/1000;
    NSString *str = nil;
    
    if ( time < 60  ) {
        str = @"刚刚";
    }
    if (time < 3600 && time >60) {
        str = [NSString stringWithFormat:@"%ld分钟前",time/60];
    }
    if (time > 3600 && time < 3600 * 24) {
        str = [NSString stringWithFormat:@"%ld小时前",time / 3600];
    }
    if (time > 3600 * 24 && time < 3600 *48) {
        str = @"1天前";
    }
    if (time > 3600 * 48) {
        NSDate *nd = [NSDate dateWithTimeIntervalSince1970:time];
        NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
        [dateFormat setDateFormat:@"yyyy/MM/dd"];
        str = [dateFormat stringFromDate:nd];
    }
    
    return str;
}

-(void)imageButton
{
    
    
    NSInteger k = 0;
    for (int i = 0; i < 1; i++) {
        for (int j= 0 ; j < 3; j++) {
            if (k < self.imageArray.count ) {
                UIImageView *img = [[UIImageView alloc]initWithFrame:CGRectMake(self.titile.frame.origin.x + imgItem*j , self.massage.frame.origin.y + self.massage.frame.size.height+ 5 + imgItem*i, imgItem * Proportion, imgItem* Proportion)];
                img.userInteractionEnabled = YES;
//                img.backgroundColor = [UIColor orangeColor];
                img.layer.borderWidth = 5;
                img.layer.borderColor = [UIColor whiteColor].CGColor;
                [self.contentView addSubview:img];
                
                UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapImageAction)];
                [img addGestureRecognizer:tap];
//                NSString *imgStr = [NSString stringWithFormat:@"http://%@:%d%@/%@",imgHost,imgPort,imgPath,self.imageArray[k]];

              
                NSURL *imgUrl2 = [NSURL URLWithString:self.imageArray[k]];

                [img sd_setImageWithURL:imgUrl2];
//                NSLog(@"%@",self.imageArray[k]);
                
                k++;
            }
        }
    }
}

+(CGFloat)heightForCell:(NSString *)content
{
    CGSize size = CGSizeMake(WIDTH , 10000);
    NSDictionary *dic = [NSDictionary dictionaryWithObject:[UIFont systemFontOfSize:15.0*Proportion] forKey:NSFontAttributeName];
    
    CGRect frame = [content boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    
    return frame.size.height;
    
}

//删除资讯
-(void)deleteInfoAction
{
    
}


-(void)tapImageAction
{
    [self.imageDelegate showImage:self.con];
    
    
}


//评论赋值重写model set方法
-(void)setCom:(OConcom *)com
{
    if (_com != com) {
        _com = com;
        
        self.hotUserName.text = com.nickName;
        self.hotGoodNum.text = [NSString stringWithFormat:@"%d",com.agreeNum];
        self.hotText.text = com.content;
//        [self.hotText sizeToFit];
        CGSize size = [self.hotText sizeThatFits:CGSizeMake(self.hotText.frame.size.width, MAXFLOAT)];
        
        self.hotText.frame =CGRectMake(self.hotText.frame.origin.x, self.hotText.frame.origin.y, self.hotText.frame.size.width, size.height);
        self.hotUserName.text = com.nickName;
        self.hotUserTime.text = [self getDate:[com.time longLongValue]];
//        NSLog(@"%@",com.content);
    }
}
//评论
-(void)highButton
{
    NSLog(@"high");
    
    
    
    
}




-(void)lowButton
{
    NSLog(@"low");
}
//资讯媒体头像
-(void)headButton
{
    NSLog(@"个人");
    [self.myDelgate pushMP4];
}



@end
